import { Comment } from "@/api/interface/comment";
import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";

export const getCommentsApi = (params: { FDocId: string }) => {
  return http.get<Comment.CommentItem[]>(PORT1 + `/comment/getComments`, params, { loading: false });
};

export const addCommentApi = (params: Comment.AddCommentParams) => {
  return http.post<Comment.CommentItem>(PORT1 + `/comment/addComment`, params, { loading: false });
};

export const deleteCommentApi = (params: { FId: string }) => {
  return http.post<boolean>(PORT1 + `/comment/deleteComment`, params, { loading: false });
};
